[ENH] improved simple assertion error message in evalutation/functions.py#1600
[ENH] improved simple assertion error message in evalutation/functions.py#1600fkiraly merged 7 commits intoopenml:mainfrom
evalutation/functions.py#1600Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1600 +/- ##
==========================================
+ Coverage 44.44% 52.07% +7.63%
==========================================
Files 36 36
Lines 4351 4351
==========================================
+ Hits 1934 2266 +332
+ Misses 2417 2085 -332 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
evalutation/functions.py
openml/evaluations/functions.py
Outdated
| assert isinstance(evals_dict["oml:evaluations"]["oml:evaluation"], list), type( | ||
| evals_dict["oml:evaluations"], | ||
| evals_dict["oml:evaluations"]["oml:evaluation"], | ||
| ) |
There was a problem hiding this comment.
This can be descriptive.
There was a problem hiding this comment.
Not sure I got what you mean, should I change something or not?
There was a problem hiding this comment.
assertion message can be improved like this:
"Expected 'oml:evaluations.oml:evaluation' to be a list, but got ..."
It's not. It's a slight mistake I found while reading the code for evaluation functions |
geetu040
left a comment
There was a problem hiding this comment.
LGTM!
CC: @fkiraly @SimonBlanke for review/merge.
413375d to
07f4461
Compare
openml/evaluations/functions.py
Outdated
| assert isinstance(evals_dict["oml:evaluations"]["oml:evaluation"], list), ( | ||
| "Expected 'oml:evaluation' to be a list, but got" | ||
| ) | ||
| f"{type(evals_dict['oml:evaluations']['oml:evaluation']).__name__}. " |
There was a problem hiding this comment.
| assert isinstance(evals_dict["oml:evaluations"]["oml:evaluation"], list), ( | |
| "Expected 'oml:evaluation' to be a list, but got" | |
| ) | |
| f"{type(evals_dict['oml:evaluations']['oml:evaluation']).__name__}. " | |
| assert isinstance(evals_dict["oml:evaluations"]["oml:evaluation"], list), ( | |
| "Expected 'oml:evaluation' to be a list, but got" | |
| f"{type(evals_dict['oml:evaluations']['oml:evaluation']).__name__}. " | |
| ) |
33ca852 to
a034a5a
Compare
Details
fixed a simple assertion error message in
evalutation/functions.py